package flujosdecontrol;

public class ExceptionsDemo {
	public static void main(String args[]) throws Exception {
		int n = 20, result = 0;
		try {
			result = n / 0;
			System.out.println("The result is" + result);
		} catch (ArithmeticException ex) {
			ex.printStackTrace();
			System.out.println("Arithmetic exception occurred: "
					+ ex.getMessage());
		}
	}
}